// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/

mod error;
mod serial_port;
mod utils;

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .plugin(tauri_plugin_shell::init())
        .invoke_handler(tauri::generate_handler![
            serial_port::open,
            serial_port::close,
            serial_port::available_ports,
            serial_port::write,
            serial_port::is_open,
        ])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
